<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>  
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
      <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>影院管理系统登录页面</title>
<script type="text/javascript" src="../js/jquery-1.11.1.min.js"></script>	
    <!-- BOOTSTRAP STYLES-->
    <link href="${pageContext.request.contextPath}/assets/css/bootstrap.css" rel="stylesheet" />
    <!-- FONTAWESOME STYLES-->
    <link href="${pageContext.request.contextPath}/assets/css/font-awesome.css" rel="stylesheet" />
    <!-- GOOGLE FONTS-->
    <link href='http://fonts.useso.com/css?family=Open+Sans' rel='stylesheet' type='text/css' />

</head>
<body style="background-color: #E2E2E2;">
    <div class="container">
        <div class="row text-center " style="padding-top:100px;">
            <div class="col-md-12">
                <img src="../assets/img/logo-invoice.png" />
            </div>
        </div>
         <div class="row ">
               
                <div class="col-md-4 col-md-offset-4 col-sm-6 col-sm-offset-3 col-xs-10 col-xs-offset-1">
                           
                            <div class="panel-body">
                                <form role="form" name="login">
                                    <hr />
                                    <h5>请输入登录信息</h5>
                                       <br />
                                     <div class="form-group input-group">
                                            <span class="input-group-addon"><i class="fa fa-tag"  ></i></span>
                                            <input type="text" name="name"  class="form-control" placeholder="你的用户名 " />
                                        </div>
                                                                              <div class="form-group input-group">
                                            <span class="input-group-addon"><i class="fa fa-lock"  ></i></span>
                                            <input type="password" name="password" class="form-control"  placeholder="你的密码" />
                                        </div>
                                    <div class="form-group">
                                            <label class="checkbox-inline">
                                                <input type="checkbox" /> 记住我
                                            </label>
                                            <span class="pull-right">
                                                   <a href="index.html" >忘记密码 ? </a> 
                                            </span>
                                        </div>
                                     
                                     <a href="#" onclick="denglu()" class="btn btn-primary ">登录</a>
                                    
                                    <hr />
                                    没注册 ? <a href="index.html" >点击这里 </a> 
                                    </form>
                            </div>
                           
                        </div>
                
                
        </div>
    </div>
 <script type="text/javascript">
                                     	function denglu(){
                                     	
                                     		var name=login.name.value;
											var password=login.password.value;
											$.post("/movie/MovieAdmin/yanzhengdenglu",{name:name,password:password},
													function(result){
														
														if(result.login=="no"){
															alert('用户名或密码错误！');
															window.location.reload();
														}
														else if(result.login=="yes"){
															location.href="/movie/MovieAdmin/index";
															alert("影院管理员登录成功！");
														}
													});
                                     	}
                                     </script>
</body>
</html>
